package com.lzy.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzy.entity.SysRoleEntity;
import org.apache.ibatis.annotations.Mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 角色信息表
 * 
 * @author lyw
 * @email lyw@gmail.com
 * @date 2023-02-02 17:06:20
 */
@Mapper
public interface SysRoleDao extends BaseMapper<SysRoleEntity> {

  List<SysRoleEntity> selectRoleByUserIdRoleName(@Param("userId") Long userId);

  /**
   * 查找当前角色是否存在
   * @param roleKey 角色信息
   * @param roleName 角色信息
   * @return 结果
   */
  int checkWhetherExists(String roleKey, String roleName);
}
